home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / InstallMaster 7.03 / Devfulldemo.exe / file0195.bin < prev    next >
Encoding:
Wise script  |  1999-04-26  |  2.8 KB  |  157 lines

  1. Document Type: WSE
  2. item: Global
  3.   Version=5.0
  4.   Title=Reading Text File Sample
  5.   Flags=00000100
  6.   Split=1420
  7.   Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  8.   Copy Default=1
  9.   Japanese Font Name=MS Gothic
  10.   Japanese Font Size=10
  11.   Start Gradient=0 0 255
  12.   End Gradient=0 0 0
  13.   Windows Flags=00000000000000010000110000001000
  14.   Message Font=MS Sans Serif
  15.   Font Size=8
  16.   Disk Filename=SETUP
  17.   Patch Flags=0000000000000001
  18.   Patch Threshold=85
  19.   Patch Memory=4000
  20. end
  21. item: Remark
  22. end
  23. item: Remark
  24.   Text=     This sample script show different ways of reading and updating a text file.
  25. end
  26. item: Remark
  27. end
  28. item: Remark
  29. end
  30. item: Remark
  31.   Text=     First, we insert the line "File Handles=50" if it does not already exist into NET.CFG.
  32. end
  33. item: Remark
  34. end
  35. item: Set Variable
  36.   Variable=ROOTDIR
  37.   Value=C:
  38. end
  39. item: Insert Line into Text File
  40.   Pathname=%ROOTDIR%\NET.TXT
  41.   New Text=File Handles=50
  42.   Search Text=File Handles=
  43.   Comment Text=; 
  44.   Line Number=0
  45.   Flags=00010110
  46. end
  47. item: Remark
  48. end
  49. item: Remark
  50.   Text=     Next, we look for the DOS=HIGH command in the CONFIG.SYS file.
  51. end
  52. item: Remark
  53. end
  54. item: Read/Update Text File
  55.   Variable=LINE
  56.   Pathname=%ROOTDIR%\CONFIG.SYS
  57. end
  58. item: Remark
  59.   Text=     Convert the line to all upper case.
  60. end
  61. item: Set Variable
  62.   Variable=LINE
  63.   Value=%LINE%
  64.   Flags=00011000
  65. end
  66. item: Parse String
  67.   Source=%LINE%
  68.   Pattern=DOS=
  69.   Variable2=DOS_PARAMS
  70. end
  71. item: If/While Statement
  72.   Variable=DOS_PARAMS
  73.   Value=HIGH
  74.   Flags=00000010
  75. end
  76. item: Set Variable
  77.   Variable=DOS_HIGH
  78.   Value=True
  79. end
  80. item: End Block
  81. end
  82. item: End Block
  83. end
  84. item: If/While Statement
  85.   Variable=DOS_HIGH
  86.   Value=True
  87. end
  88. item: Display Message
  89.   Title=Config.sys
  90.   Text=DOS is currently loaded high.
  91. end
  92. item: End Block
  93. end
  94. item: Remark
  95. end
  96. item: Remark
  97.   Text=     Next, we comment out any IRQ= lines in NET.TXT.
  98. end
  99. item: Remark
  100. end
  101. item: Read/Update Text File
  102.   Variable=LINE
  103.   Pathname=%ROOTDIR%\NET.TXT
  104.   Flags=00000001
  105. end
  106. item: Parse String
  107.   Source=%LINE%
  108.   Pattern=IRQ=
  109.   Variable2=NEW_LINE
  110.   Flags=00000010
  111. end
  112. item: If/While Statement
  113.   Variable=NEW_LINE
  114.   Value=%LINE%
  115.   Flags=00000001
  116. end
  117. item: Set Variable
  118.   Variable=LINE
  119.   Value=; %LINE%
  120. end
  121. item: End Block
  122. end
  123. item: End Block
  124. end
  125. item: Remark
  126. end
  127. item: Remark
  128.   Text=     Last, we remove any comment lines (lines that begin with REM)
  129. end
  130. item: Remark
  131. end
  132. item: Read/Update Text File
  133.   Variable=LINE
  134.   Pathname=%ROOTDIR%\NET.TXT
  135. end
  136. item: Parse String
  137.   Source=%LINE%
  138.   Pattern=REM 
  139.   Variable2=NEW_LINE
  140.   Flags=00000010
  141. end
  142. item: If/While Statement
  143.   Variable=NEW_LINE
  144.   Value=%LINE%
  145. end
  146. item: Insert Line into Text File
  147.   Pathname=%ROOTDIR%\NET.NEW
  148.   New Text=%LINE%
  149.   Line Number=0
  150. end
  151. item: End Block
  152. end
  153. item: End Block
  154. end
  155. item: Remark
  156. end
  157.